package com.ai.module.business.service.impl;

import com.ai.module.business.domain.req.ImageGroundReq;
import com.ai.module.business.mapper.ImageGroundMapper;
import com.ai.module.business.service.ImageGroundService;
import com.ai.module.user.domain.entity.ImageGroundEntity;
import com.ai.module.user.domain.vo.ImageGroundVo;
import com.ai.module.user.domain.vo.UserImageVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * @author: MrHe
 * @create: 2024-01-25 23:36
 * @description:
 **/
@Service
public class ImageGroundServiceImpl extends ServiceImpl<ImageGroundMapper, ImageGroundEntity> implements ImageGroundService {

    @Override
    public Page<ImageGroundVo> imageGrounds(ImageGroundReq imageGround) {
        String sourceType = imageGround.getSourceType()   ;
        return this.baseMapper.imageGrounds(new Page<UserImageVo>(imageGround.getPage(),imageGround.getSize()),sourceType);
    }

}
